package com.baiyang.server.dao.read;

import com.baiyang.server.dao.BaseDao;
import org.apache.ibatis.annotations.Mapper;

import com.baiyang.server.model.read.ReadRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

@Mapper
public interface ReadRecordDao extends BaseDao<ReadRecord> {
    List<ReadRecord> getArticleByReadRecord(@Param(value = "userId") String userId,
                                            @Param(value = "pageStart")int pageStart,
                                            @Param(value = "pageSize")int pageSize);

    List<ReadRecord> selectByUserId(String userId);

    List<ReadRecord> selectByUserIds(@Param(value = "list") List<String> ids,
                                     @Param(value = "i") int i);

    int getTodayReadNum(@Param(value = "articleId") String id, @Param(value = "date") String date);
}
